def setup
  size screen.width, screen.height, OPENGL
  noStroke
end

def draw
  lights
  background 0
  
  w, h = ceil(width/100.0), ceil(height/100.0)
  grid(w, h, 100, 100) do |x, y|   
    pushMatrix
    translate x+50, y+50
    rotateY map(mouseX, 0, width, 0, PI)
    rotateX map(mouseY, 0, height, 0, PI)
    box 90
    popMatrix
  end
end